<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
	<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript">
        function on_check_finger(index){
          var rows = $('#worker_table').datagrid('getRows');		    
		  $('#deptno').text(rows[index].deptno);
		  $('#identifyno').text(rows[index].identifyno);
		  $('#identifyno_val').val(rows[index].identifyno);
		  $('#name').text(rows[index].name);
		  $('#modmgr').text(rows[index].modmgr);
		  set_finger_status(rows[index].fingerstatus);
		  
          $('#check_finger_detail_panel').window('open', {forceOpen:false});
        }
        function on_check_finger_ui(value,row,index){
          return '<a href="#" class="edtclass" onclick="on_check_finger('+index+')">复核指纹</a>';
        }

        function on_dept_node_clicked(node){
          if (node==null)return;
          var includeflag=$('#include_down_dept').attr('checked');
          var obj = {deptno:node.id,includedown:includeflag,checkflag:'0'};
     		new_data_grid('#worker_table',make_worker_finger_table_fields(
  	      		'复核指纹',on_check_finger_ui),'queryFingerWorkersByDept.action',
  	        	obj,16);
        }
        
    	$(document).ready(function(){
    	    var sel_dept_panel=$('#sel_worker_dept_pane').panel();
    	    set_dept_panel_ctrl(sel_dept_panel,'depttree');    	    

  			$('#include_down_dept').change(function(){
  			  var node=$('#depttree').tree('getSelected');
  			  on_dept_node_clicked(node);
  			});

    		$('#depttree').tree({url:'queryDeptTree.action',onClick:on_dept_node_clicked,
    			onLoadError: function(){alert('系统错误，服务器可能已关闭！')}});
    		$('#link_status').hide();
     		$('#check_finger_panel').panel({onClose:function(){
          		$("#sel_worker_dept_pane").panel("destroy");
     		}});

     		set_worker_finger_query_action('0','#worker_table','复核指纹',on_check_finger_ui,
     			'queryFingerWorkersByIdnoOrName',16);
    	});
    </script>
	</head>
	<body>
	<s:include value="checkfingerdetail.jsp"></s:include>
    <div id="check_finger_panel" collapsible="false" fit="true" title="复核员工指纹" 
    	resizable="false" collapsible="false" minimizable="false" maximizable="false" 
    	closable="true" icon="icon-save" class="jquery_panel">
    	<table width="100%" height="94%">
    		<tr>
    			<td width="260px"><div id="sel_worker_dept_pane" collapsible="false" fit="true" 
    				title="选择员工机构" resizable="false" collapsible="false" minimizable="false" 
    				maximizable="false" noheader="false" closable="false"
    				style="margin:0px;padding:0px;overflow-y:scroll">
    				<ul id="depttree"></ul></div></td>
    			<td>
    			<table width="100%" height="100%">
    				<tr valign="top" height="20"><td class="param_form_css">
    					<s:include value="/app/query_param.jsp"/></td></tr>
    				<tr valign="top"><td ><table id="worker_table" title="未复核指纹的员工" singleSelect="true" 
    					fit="true" fitColumns="true"></table>
    				</td>
    				</tr>
    			</table>
 				</td>
    		</tr>
    	</table>
    </div>
    
    </body>
</html>